package netty.consumer;

import netty.api.IRPCHelloService;
import netty.api.IRPCService;
import netty.consumer.proxy.RpcProxy;

public class RpcConsumer {
    public static void main(String[] args) {
        IRPCHelloService rpcHelloService = RpcProxy.create(IRPCHelloService.class);
        System.out.println(rpcHelloService.hello("wly"));
        IRPCService service = RpcProxy.create(IRPCService.class);
        System.out.println("8 + 2 = " + service.add(8, 2));
        System.out.println("8 - 2 = " + service.sub(8, 2));
        System.out.println("8 * 2 = " + service.mult(8, 2));
        System.out.println("8 / 2 = " + service.div(8, 2));
    }
}
